/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntidadesDBPrueba;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Facundo
 */
@Entity
@Table(name = "postulante", catalog = "tpare", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Postulante.findAll", query = "SELECT p FROM Postulante p"),
    @NamedQuery(name = "Postulante.findByIdPostulante", query = "SELECT p FROM Postulante p WHERE p.idPostulante = :idPostulante"),
    @NamedQuery(name = "Postulante.findByNombreTipoDoc", query = "SELECT p FROM Postulante p WHERE p.nombreTipoDoc = :nombreTipoDoc"),
    @NamedQuery(name = "Postulante.findByNroDoc", query = "SELECT p FROM Postulante p WHERE p.nroDoc = :nroDoc"),
    @NamedQuery(name = "Postulante.findByCodAviso", query = "SELECT p FROM Postulante p WHERE p.codAviso = :codAviso"),
    @NamedQuery(name = "Postulante.findBySeleccionado", query = "SELECT p FROM Postulante p WHERE p.seleccionado = :seleccionado")})
public class Postulante implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idPostulante", nullable = false)
    private Integer idPostulante;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 20)
    @Column(name = "nombreTipoDoc", nullable = false, length = 20)
    private String nombreTipoDoc;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nroDoc", nullable = false)
    private int nroDoc;
    @Basic(optional = false)
    @NotNull
    @Column(name = "codAviso", nullable = false)
    private int codAviso;
    @Basic(optional = false)
    @NotNull
    @Column(name = "seleccionado", nullable = false)
    private int seleccionado;

    public Postulante() {
    }

    public Postulante(Integer idPostulante) {
        this.idPostulante = idPostulante;
    }

    public Postulante(Integer idPostulante, String nombreTipoDoc, int nroDoc, int codAviso, int seleccionado) {
        this.idPostulante = idPostulante;
        this.nombreTipoDoc = nombreTipoDoc;
        this.nroDoc = nroDoc;
        this.codAviso = codAviso;
        this.seleccionado = seleccionado;
    }

    public Integer getIdPostulante() {
        return idPostulante;
    }

    public void setIdPostulante(Integer idPostulante) {
        this.idPostulante = idPostulante;
    }

    public String getNombreTipoDoc() {
        return nombreTipoDoc;
    }

    public void setNombreTipoDoc(String nombreTipoDoc) {
        this.nombreTipoDoc = nombreTipoDoc;
    }

    public int getNroDoc() {
        return nroDoc;
    }

    public void setNroDoc(int nroDoc) {
        this.nroDoc = nroDoc;
    }

    public int getCodAviso() {
        return codAviso;
    }

    public void setCodAviso(int codAviso) {
        this.codAviso = codAviso;
    }

    public int getSeleccionado() {
        return seleccionado;
    }

    public void setSeleccionado(int seleccionado) {
        this.seleccionado = seleccionado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPostulante != null ? idPostulante.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Postulante)) {
            return false;
        }
        Postulante other = (Postulante) object;
        if ((this.idPostulante == null && other.idPostulante != null) || (this.idPostulante != null && !this.idPostulante.equals(other.idPostulante))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EntidadesDBPrueba.Postulante[ idPostulante=" + idPostulante + " ]";
    }
    
}
